<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for指令</title>
    <script src="vue.js"></script>
    <style>
    </style>
</head>

<body>
    <div id="app">
        <table border="1px" cellpadding="3px" cellspacing="5px">
            <tr>
                <td>工号</td>
                <td>姓名</td>
                <td>年龄</td>
                <td>学历</td>
                <td>电话</td>
            </tr>
            <tr v-for="emp in empList">
                <td>{{emp.empno}}</td>
                <td>{{emp.ename}}</td>
                <td>{{emp.age}}</td>
                <td>{{emp.education}}</td>
                <td>{{emp.phone}}</td>
            </tr>
        </table>
    </div>
</body>

</html>
<script>
    var vm = new Vue({
        el: "#app",
        data: {
            empList: [
                { empno: 73, ename: '张三', age: 32, education: '本科', phone: '12' },
                { empno: 74, ename: '李四', age: 23, education: '本科', phone: '152' },
                { empno: 75, ename: '王五', age: 42, education: '本科', phone: '129' },
                { empno: 76, ename: '赵六', age: 52, education: '本科', phone: '652' }
            ]
        }
    });
</script>